#ifndef INDEXVISUALIZER_H_INCLUDED
#define INDEXVISUALIZER_H_INCLUDED

#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include "SPSegment.h"

using namespace std;

class IndexVisualizer
{
public:
    IndexVisualizer(const IndexVisualizer& other) = delete;
    IndexVisualizer operator=(const IndexVisualizer& other) = delete;
    IndexVisualizer() {};

    void addToStringMethod(string (*keyToString) (char*));
    void addNode(string nodeDescription);
    void addChildRelation(unsigned from, unsigned position, unsigned to);
    void addNextRelation(unsigned from, unsigned to);
    void print();
    void saveAs(string fileName);

    static string toString(unsigned u);
    static string toString(TID& t);
    static string toString(char* x);
    string (*keyToString) (char*);

private:
    vector<string> nodes;
    vector<string> relations;
};

#endif // INDEXVISUALIZER_H_INCLUDED
